<%@ page  contentType="text/html; charset=utf-8" language="java" import="java.sql.*" import="com.lizhk.Connect"  errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>密码修改</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<script type=text/javascript src="JS文件/daohanglan.js"></script>
<style type="text/css">
<!--
@import url("tpms.css");

}
-->
</style>
<script type=text/javascript >
function check()
{   
     var pw = document.form1.hidden.value;
     var pw1 = document.form1.oldPassword.value;
     var pw2 = document.form1.newPassword1.value;
     var pw3 = document.form1.newPassword2.value;
     //alert(pw);
     if(pw1=="")
       {alert("原始密码不能为空值");return false;}
     else if(pw2=="")
       {alert("新密码不能为空值");return false;}
     else if(pw3=="")
       {alert("确认密码不能为空值");return false;}
     else if(pw2!=pw3)
       {alert("两次密码输入不同，请重新输入");return false;}
     else if(pw!=pw1)
       {alert("原始密码不正确");return false;}  
     else
        return true;
       
}
</script>

</head>

<body onload="startTime()">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr >
    <th valign="top" scope="col">
    <table align="center" width="72%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="70%" height="85" align="left" scope="col"><img src="images/indexlogo.png" width="600" height="85" border="0" /></th>
        <th width="25%" scope="col"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <th align="left" nowrap="nowrap" class="登录信息" scope="col">当前用户：<span style="color: #F87B29"><%=(String)session.getAttribute("realname") %></span></th>
            <th nowrap="nowrap" class="登录信息" scope="col"><a href="logout.jsp" >注销</a>
            </th>
          </tr>
          <tr>
            <td colspan="2">&nbsp;</td>
          </tr>
          <tr>
            <td nowrap="nowrap" align="left" class="登录信息"><a href="password.jsp">修改密码</a></td>
            <td nowrap="nowrap" class="登录信息"><a href="profile.jsp">修改个人资料</a></td>
          </tr>
        </table></th>
      </tr>
      <tr>
        <td height="5" colspan="2" bgcolor="#FA4500"></td>
      </tr>
      <tr>
        <td height="25" colspan="2" bgcolor="#FF4500">
       <ul id="nav">
<li><a href="tpms_index.jsp">首页</a></li>
<li><a href="#l">用户管理</a>
<ul>
<li><a href="password.jsp">密码修改</a></li>
<li><a href="profile.jsp">个人资料修改</a></li>
</ul>
</li>
<li><a href="#">产品维护</a>
<ul>
<li><a href="pro_define.jsp">产品定义</a></li>
<li><a href="main_relate_sub.jsp">维护主体和附属产品关系</a></li>
<li><a href="pro_rule_define.jsp">产品规则定义</a></li>
<li><a href="pro_price_set.jsp">产品定价</a></li>
</ul>
</li>
<li><a href="#">资费管理</a>
<ul>
<li><a href="tariff_set.jsp">设置资费方案</a></li>
<li><a href="tariff_rule.jsp">资费规则维护</a></li>
<li><a href="tariff_rule_rela.jsp">资费规则关系维护</a></li>

</ul>
</li>
<li><a href="#">产品管理</a>
<ul>

<li><a href="pro_pack_define.jsp">产品包定义</a></li>

<li><a href="pack_price_set.jsp">产品包定价</a></li>
<li><a href="client_relate_pack.jsp">建立客户性质与产品包的关系</a></li>
</ul>
</li>
</ul>        </td>
      </tr>
      <tr>
        <td height="25" align="left" class="当前位置"><p>当前位置：<a href="tpms_index.jsp">首页</a>&gt;&gt;修改密码</p></td>
        <td id="time" align="right" class="当前位置">
<script type="text/javascript" >
function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('time').innerHTML="现在时间是："+h+":"+m+":"+s
t=setTimeout('startTime()',500)
}

function checkTime(i)
{
if (i<10) 
  {i="0" + i}
  return i
}
</script>
        </td>
        
      </tr>
     
      <tr  style="background:url(images/11.jpg)  repeat-x">
        <td height="530" colspan="2" valign="top">
        <form id="form1" name="form1" method="post" action="password_deal.jsp" onsubmit="return check();">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <th scope="col">
              <table class="下边框" width="100%"  border="1" cellspacing="0" cellpadding="1">
              <tr>
                <th width="100%" height="26" align="left" valign="middle" nowrap="nowrap" bgcolor="#639BCE" scope="col">&nbsp;</th>
              </tr>
            </table></th>
            </tr>
            <tr>
              <td align="center" valign="middle"><table border="0" width="70%" cellspacing="0" cellpadding="0">
                <tr>
                  <th height="400" align="center" valign="top" class="tablecontent" scope="col"> 
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <table align="center" width="95%" cellspacing="0" cellpadding="0">
                      <tr>
                        <th align="left" style="font-weight: normal; font-style: normal; font-size: 13px">&nbsp;&nbsp;为了更好的保护您的帐户，请确认选择您容易记忆，但是很难被他人猜到的密码。不要跟任何人分享您的密码，不要使用您以前用过的密码。为了安全起见，您的新密码长度不得少于6个字符。建议您的密码是大写字母和小写字母（记住您的密码是区分大小写的），数字，以及特殊字符（例如+，？，*）的组合。</th>
                      </tr>
                    </table>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    
                    
                    <p>&nbsp;</p>
                    <table align="center" width="95%" cellspacing="0" cellpadding="0">
                      <tr>
                        <th align="center" valign="middle"  scope="col"> 
                        <p class="tablecontent">
                        <% String username = (String)session.getAttribute("username");
                           Connect conn = new Connect();
                           ResultSet rs = conn.exeQuery("select * from user_info where username='"+username+"'");
                           rs.next();
                           String pword = rs.getString("password");
                           %>
                         <input type="hidden" name="hidden" value="<%=pword%>">
                        </p>
                          <p class="tablecontent"><span class="星号">*</span>请输入原始密码&nbsp;
                            <input type="password" name="oldPassword" id="oldPassword"/>
                          </p>
                          <p>&nbsp;</p>
                          <p class="tablecontent"><span class="星号">*</span>请输入新密码&nbsp;&nbsp;&nbsp;
                            <input type="password" name="newPassword1" id="newPassword1" />
                          </p>
                          <p>&nbsp;</p>
                          <p class="tablecontent"><span class="星号">*</span>请再次输入新密码
                            <input type="password" name="newPassword2" id="newPassword2" />
                          </p>
                          <p>&nbsp;</p>
                          <p>&nbsp;</p>
                          <p>
                            <span class="tablecontent">
                            <input type="submit" name="button" id="button" value="确认"  />
                            &nbsp;
                            <input type="button" name="button" id="button" value="取消" onclick="document.location.href='tpms_index.jsp'" />
                            </span></p>
                          &nbsp;</th>
                      </tr>
                    </table>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p></th>
                </tr>
              </table></td>
            </tr>
          </table>
        
        </form></td>
      </tr>
      <tr>
        <td height="30" colspan="2" align="center" valign="bottom" bgcolor="#639BCE"><p class="页脚">版权所有：湖南省电信有限公司长沙市分公司管理系统 经营许可证号：湘ICP证010001</p>
          <p class="页脚">Copyright @2009-2019, China Telecom, All right reserved</p></td>
      </tr>
    </table></th>
  </tr>
</table>
</body>
</html>
